As is well known, polyimide foams are usually produced by forming a polyimide precursor and converting the precursors to a foamed polyimide structure. Usually the precursor is in essence a mixture of a tetracarboxylic acid or suitable derivative thereof and one or more primary diamines with or without a foaming agent. On heating this mixture these components interact with each other and volatile components are released within the precursor so that a foamed intermediate structure (usually composed of a polyamic acid/ester) is formed which on further heating is transformed into a cured polyimide foam.